package demo;


import java.util.HashSet;
import java.util.Set;

public class sseresponse {
    public boolean check() {
        String demo = respMsg.DEMO8.getMsg();
        String[] targetLists = demo.split(";");

        String resp = "海关税，通常的是关税，是进出口货物、进境物品在通过一国海关时，由海关根据国家法律、法规对进出口货物、进境物品征收的一种税。根据《中华人民共和国进出口关税条例》和相关法律、法规，海关税的征收和缴纳需要遵循以下原则和规定：";
        for(String s : targetLists) {
            System.out.println(s);
            if (resp.contains(s)){
                return true;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        sseresponse sseresponse = new sseresponse();
        System.out.println(sseresponse.check());
    }

    public static void main1(String[] args) {
        /*String resp = respMsg.DEMO2.getMsg();
        String[] respArray = resp.split("data: ");

       // String s =respArray[respArray.length - 2];
        String s = resp;
        String pt = s.substring(s.indexOf("\"", 8)+1, s.indexOf("\"", 12));

        String demo = respMsg.DEMO3.getMsg();
        String[] ret =  demo.split(";");
        Set<String> whiteSet = new HashSet<String>();
        for(String x:ret) {
            whiteSet.add(x);
        }*/

        /*String files = respMsg.DEMO5.getMsg();
        String[] list = files.split(";");
        for(String x : list){
            System.out.println(x);

        }*/
       /* String resp = respMsg.DEMO6.getMsg();
        String sss = resp.substring(0,resp.indexOf("at"));
        resp.indexOf("at");
        System.out.println("!：" +sss);

        resp = respMsg.DEMO5.getMsg();
        sss = resp.substring(0,1);
        System.out.println("!：" + sss);
        String resp = respMsg.DEMO7.getMsg();
        String sss = resp.substring(0,resp.indexOf("at "));
        resp.indexOf("at");
        System.out.println("!：" +sss);*/

    }
}
